package com.scraper.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "sale_object")
public class SaleObject implements Serializable {

	private static final long serialVersionUID = -5999722579802236148L;

	private Integer id;

	private EstateType estateType;

	private Region region;

	private Date addingDate;

	private Integer apartmentSquare;

	private Integer stage;

	private Integer rooms;

	private Long price;

	private String description;

	private Agency agency;

	private User user;

	private String URL;

	private OperationType operationType;

	private City city;

	private String address;

	private Integer livingSquare;

	private Integer floorCount;

	private String contactInformation;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column
	public Integer getId() {
		return id;
	}

	@ManyToOne
	public Region getRegion() {
		return region;
	}

	@Column
	public Date getAddingDate() {
		return addingDate;
	}

	@Column
	public Integer getApartmentSquare() {
		return apartmentSquare;
	}

	@Column
	public Integer getStage() {
		return stage;
	}

	@Column
	public Integer getRooms() {
		return rooms;
	}

	@Column(length=10000)
	public String getDescription() {
		return description;
	}

	@ManyToOne
	public Agency getAgency() {
		return agency;
	}

	@ManyToOne
	public User getUser() {
		return user;
	}

	@Column
	public String getURL() {
		return URL;
	}

	@Enumerated(EnumType.STRING)
	public OperationType getOperationType() {
		return operationType;
	}
	
	@Enumerated(EnumType.STRING)
	public EstateType getEstateType() {
		return estateType;
	}


	@ManyToOne
	public City getCity() {
		return city;
	}

	@Column
	public String getAddress() {
		return address;
	}

	@Column
	public Integer getLivingSquare() {
		return livingSquare;
	}

	@Column
	public Integer getFloorCount() {
		return floorCount;
	}

	@Column
	public String getContactInformation() {
		return contactInformation;
	}

	@Column
	public Long getPrice() {
		return price;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public void setRegion(Region region) {
		this.region = region;
	}

	public void setAddingDate(Date addingDate) {
		this.addingDate = addingDate;
	}

	public void setApartmentSquare(Integer apartmentSquare) {
		this.apartmentSquare = apartmentSquare;
	}

	public void setStage(Integer stage) {
		this.stage = stage;
	}

	public void setRooms(Integer rooms) {
		this.rooms = rooms;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setAgency(Agency agency) {
		this.agency = agency;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public void setURL(String uRL) {
		URL = uRL;
	}

	public void setOperationType(OperationType operationType) {
		this.operationType = operationType;
	}

	public void setCity(City city) {
		this.city = city;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public void setLivingSquare(Integer livingSquare) {
		this.livingSquare = livingSquare;
	}

	public void setFloorCount(Integer floorCount) {
		this.floorCount = floorCount;
	}

	public void setContactInformation(String contactInformation) {
		this.contactInformation = contactInformation;
	}

	public void setPrice(Long price) {
		this.price = price;
	}

	public void setEstateType(EstateType estateType) {
		this.estateType = estateType;
	}
}
